home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / pine / osdep / os-asv.h < prev    next >
C/C++ Source or Header  |  1996-06-05  |  15KB  |  420 lines

  1. /*----------------------------------------------------------------------
  2.   $Id: os-asv.h,v 1.9 1996/06/05 17:12:38 mikes Exp $
  3.   modified os-sco.h,v 1.23
  4.  
  5.             T H E    P I N E    M A I L   S Y S T E M
  6.  
  7.    Laurence Lundblade and Mike Seibel
  8.    Networks and Distributed Computing
  9.    Computing and Communications
  10.    University of Washington
  11.    Administration Builiding, AG-44
  12.    Seattle, Washington, 98195, USA
  13.    Internet: lgl@CAC.Washington.EDU
  14.              mikes@CAC.Washington.EDU
  15.  
  16.    Please address all bugs and comments to "pine-bugs@cac.washington.edu"
  17.  
  18.  
  19.    Pine and Pico are registered trademarks of the University of Washington.
  20.    No commercial use of these trademarks may be made without prior written
  21.    permission of the University of Washington.
  22.  
  23.    Pine, Pico, and Pilot software and its included text are Copyright
  24.    1989-1996 by the University of Washington.
  25.  
  26.    The full text of our legal notices is contained in the file called
  27.    CPYRIGHT, included with this distribution.
  28.  
  29.  
  30.    Pine is in part based on The Elm Mail System:
  31.     ***********************************************************************
  32.     *  The Elm Mail System  -  Revision: 2.13                             *
  33.     *                                                                     *
  34.     *             Copyright (c) 1986, 1987 Dave Taylor              *
  35.     *             Copyright (c) 1988, 1989 USENET Community Trust   *
  36.     ***********************************************************************
  37.  
  38.  
  39.   ----------------------------------------------------------------------*/
  40. /*
  41.     Tim Rice    Wed Mar  6 21:28:23 PST 1996
  42.     tim@trr.metro.net
  43.     Altos System V
  44. */
  45.  
  46. #ifndef _OS_INCLUDED
  47. #define _OS_INCLUDED
  48.  
  49. typedef long fpos_t ;
  50. #define ENAMETOOLONG 78 /* path name is too long */
  51.  
  52.  
  53. /*----------------------------------------------------------------------
  54.  
  55.    This first section has some constants that you may want to change
  56.    for your configuration.  This is the Altos System V version of the os.h file.
  57.    Further down in the file are os-dependent things that need to be set up
  58.    correctly for each os.  They aren't interesting, they just have to be
  59.    right.  There are also a few constants down there that may be of
  60.    interest to some.
  61.  
  62.  ----*/
  63.  
  64. /*----------------------------------------------------------------------
  65.    Define this if you want the disk quota to be checked on startup.
  66.    Of course, this only makes sense if your system has quotas.  If it doesn't,
  67.    there should be a dummy disk_quota() routine in os-xxx.c so that defining
  68.    this won't be harmful anyway.
  69.  ----*/
  70. /* #define USE_QUOTAS  /* comment out if you never want quotas checked */
  71.  
  72.  
  73.  
  74. /*----------------------------------------------------------------------
  75.    Define this if you want to allow the users to change their From header
  76.    line when they send out mail.  The users will still have to configure
  77.    either default-composer-hdrs or customized-hdrs to get at the From
  78.    header, even if this is set.
  79.  ----*/
  80. /* #define ALLOW_CHANGING_FROM  /* comment out to not allow changing From */
  81.  
  82.  
  83.  
  84. /*----------------------------------------------------------------------
  85.    Define this if you want to allow users to turn on the feature that
  86.    enables sending to take place in a fork()'d child.  This may reduce
  87.    the time on the user's wall clock it takes to post mail.
  88.    NOTE: You'll also have to make sure the appropriate osdep/postreap.*
  89.          file is included in the os-*.ic file for your system.
  90.  ----*/
  91. /* #define BACKGROUND_POST  /* comment out to disable posting from child */
  92.  
  93.  
  94.  
  95. /*----------------------------------------------------------------------
  96.     Turn this on if you want to disable the keyboard lock function.
  97.  ----*/
  98. /* #define NO_KEYBOARD_LOCK */
  99.  
  100.  
  101.  
  102. /*----------------------------------------------------------------------
  103.     Turn this on to trigger QP encoding of sent message text if it contains
  104.   "From " at the beginning of a line or "." on a line by itself.
  105.  ----*/
  106. /* #define ENCODE_FROMS */
  107.  
  108.  
  109.  
  110. /*----------------------------------------------------------------------
  111.     Timeouts (seconds)
  112.  ----*/
  113. #define DF_MAILCHECK      "150" /* How often to check for new mail, by
  114.                    default.  There's some expense in doing
  115.                    this so it shouldn't be done too
  116.                    frequently.  (Can be set in config
  117.                    file now.)  */
  118.  
  119. /*----------------------------------------------------------------------
  120.     Check pointing (seconds)
  121.  ----*/
  122. #define CHECK_POINT_TIME (5*60) /* Check point the mail file (write changes
  123.                    to disk) if more than CHECK_POINT_TIME
  124.                    seconds have passed since the first
  125.                    change was made.  Depending on what is
  126.                    happening, we may wait up to four times
  127.                    this long, since we don't want to do the
  128.                    slow check pointing and irritate the user. */
  129.  
  130. #define CHECK_POINT_FREQ   (12) /* Check point the mail file if there have been
  131.                                    at least this many (status) changes to the
  132.                    current mail file.  We may wait longer if
  133.                    it isn't a good time to do the checkpoint. */
  134.  
  135.  
  136.  
  137. /*----------------------------------------------------------------------
  138.  In scrolling through text, the number of lines from the previous
  139.  screen to overlap when showing the next screen.  Usually set to two.
  140.  ----*/
  141. #define    DF_OVERLAP    "2"
  142.  
  143.  
  144.  
  145. /*----------------------------------------------------------------------
  146.  When scrolling screens, the number of lines from top and bottom of
  147.  the screen to initiate single-line scrolling.
  148.  ----*/
  149. #define    DF_MARGIN    "0"
  150.  
  151.  
  152.  
  153. /*----------------------------------------------------------------------
  154.  Default fill column for pine composer and maximum fill column.  The max
  155.  is used to stop people from setting their custom fill column higher than
  156.  that number.  Note that DF_FILLCOL is a string but MAX_FILLCOL is an integer.
  157.  ----*/
  158. #define    DF_FILLCOL    "74"
  159. #define    MAX_FILLCOL    80
  160.  
  161.  
  162.  
  163. /*----- System-wide config file ----------------------------------------*/
  164. #define SYSTEM_PINERC             "/usr/local/lib/pine.conf"
  165. #define SYSTEM_PINERC_FIXED       "/usr/local/lib/pine.conf.fixed"
  166.  
  167.  
  168. /*----------------------------------------------------------------------
  169.    The default folder names and folder directories (some for backwards
  170.    compatibility).  Think hard before changing any of these.
  171.  ----*/
  172. #define DF_DEFAULT_FCC            "sent-mail"
  173. #define DEFAULT_SAVE              "saved"
  174. #define POSTPONED_MAIL            "postponed"
  175. #define POSTPONED_MSGS            "ppnd-msgs"
  176. #define INTERRUPTED_MAIL          ".pine-intr"
  177. #define DEADLETTER                "dead.letter"
  178. #define DF_MAIL_DIRECTORY         "mail"
  179. #define INBOX_NAME                "INBOX"
  180. #define DF_SIGNATURE_FILE         ".signature"
  181. #define DF_ELM_STYLE_SAVE         "no"
  182. #define DF_HEADER_IN_REPLY        "no"
  183. #define DF_OLD_STYLE_REPLY        "no"
  184. #define DF_USE_ONLY_DOMAIN_NAME   "no"
  185. #define DF_FEATURE_LEVEL          "sapling"
  186. #define DF_SAVE_BY_SENDER         "no"
  187. #define DF_SORT_KEY               "arrival"
  188. #define DF_AB_SORT_RULE           "fullname-with-lists-last"
  189. #define DF_SAVED_MSG_NAME_RULE    "default-folder"
  190. #define DF_FCC_RULE               "default-fcc"
  191. #define DF_STANDARD_PRINTER       "lp"
  192. #define ANSI_PRINTER              "attached-to-ansi"
  193. #define DF_ADDRESSBOOK            ".addressbook"
  194. #define DF_BUGS_FULLNAME          "Pine Developers"
  195. #define DF_BUGS_ADDRESS           "pine-bugs@cac.washington.edu"
  196. #define DF_SUGGEST_FULLNAME       "Pine Developers"
  197. #define DF_SUGGEST_ADDRESS        "pine-suggestions@cac.washington.edu"
  198. #define DF_PINEINFO_FULLNAME      "Pine-Info News Group"
  199. #define DF_PINEINFO_ADDRESS       "pine-info@cac.washington.edu"
  200. #define DF_LOCAL_FULLNAME         "Local Support"
  201. #define DF_LOCAL_ADDRESS          "postmaster"
  202. #define DF_KBLOCK_PASSWD_COUNT    "1"
  203.  
  204. /*----------------------------------------------------------------------
  205.    The default printer when pine starts up for the first time with no printer
  206.  ----*/
  207. #define DF_DEFAULT_PRINTER        ANSI_PRINTER
  208.  
  209. /*----------------------------------------------------------------------
  210.    Default mail posting agent (must use sendmail's "-t" or similar)
  211.  ----*/
  212. #define    DF_SENDMAIL_PATH      "/usr/lib/sendmail -oi -oem -t"
  213.  
  214.  
  215.  
  216. /*----------------------------------------------------------------------
  217.  
  218.    OS dependencies, Altos System V version.  See also the os-asv.ic files.
  219.    The following stuff may need to be changed for a new port, but once
  220.    the port is done, it won't change.  At the bottom of the file are a few
  221.    constants that you may want to configure differently than they
  222.    are configured, but probably not.
  223.  
  224.  ----*/
  225.  
  226.  
  227.  
  228. /*----------------- Are we ANSI? ---------------------------------------*/
  229. /* #define ANSI          /* this is an ANSI compiler */
  230.  
  231. /*------ If our compiler doesn't understand type void ------------------*/
  232. /* #define void char     /* no void in compiler */
  233.  
  234. /*-------- Standard ANSI functions usually defined in stdlib.h ---------*/
  235. /* #include <stdlib.h>  /* declarations of many common functions */
  236. /*---- Declare getenv() if not already declared ------------------------*/
  237. char *getenv();      /* often declared in stdlib.h */
  238.  
  239.  
  240.  
  241. /*------- Some more includes that should usually be correct ------------*/
  242. #include <pwd.h>
  243. #include <sys/wait.h>
  244. #include <sys/types.h>    /* needed for stat.h    */
  245. #include <sys/stat.h>
  246. #include <fcntl.h>
  247. #include <netdb.h>
  248.  
  249.  
  250.  
  251. /*----------------- locale.h -------------------------------------------*/
  252. /* #include <locale.h>  /* To make matching and sorting work right */
  253.  
  254.  
  255.  
  256. /*----------------- time.h ---------------------------------------------*/
  257. #include <time.h>
  258. /* plain time.h isn't enough on some systems */
  259. #include <sys/time.h>  /* For struct timeval usually in time.h */
  260.  
  261.  
  262.  
  263. /*--------------- signal.h ---------------------------------------------*/
  264. #include <signal.h>      /* sometimes both required, sometimes */
  265. /* #include <sys/signal.h>  /* only one or the other */
  266.  
  267. #define SigType void     /* value returned by sig handlers is void */
  268. /* #define SigType int      /* value returned by sig handlers is int */
  269.  
  270. /* #define POSIX_SIGNALS    /* use POSIX signal semantics (ttyin.c) */
  271. /* #define SYSV_SIGNALS    /* use System-V signal semantics (ttyin.c) */
  272.  
  273.  
  274.  
  275.  
  276. /*-------------- A couple typedef's for integer sizes ------------------*/
  277. typedef unsigned int usign32_t;
  278. typedef unsigned short usign16_t;
  279.  
  280.  
  281.  
  282. /*-------------- qsort argument type -----------------------------------*/
  283. #define QSType void  /* qsort arg is of type void * */
  284. /* #define QSType char  /* qsort arg is of type char * */
  285.  
  286.  
  287.  
  288. /*------ how help text is referenced (always char ** on Unix) ----------*/
  289. #define HelpType char **
  290. #define NO_HELP (char **)NULL
  291.  
  292.  
  293.  
  294. /*
  295.  * Choose one of the following three terminal drivers
  296.  */
  297.  
  298. /*--------- Good 'ol BSD -----------------------------------------------*/
  299. /* #include <sgtty.h>      /* BSD-based systems */
  300.  
  301. /*--------- System V terminal driver -----------------------------------*/
  302. #define HAVE_TERMIO     /* this is for pure System V */
  303. #include <termio.h>     /* Sys V */
  304.  
  305. /*--------- POSIX terminal driver --------------------------------------*/
  306. /* #define HAVE_TERMIOS    /* this is an alternative */
  307. /* #include <termios.h>    /* POSIX */
  308.  
  309.  
  310.  
  311. /*-------- Use poll system call instead of select ----------------------*/
  312. /* trr    we have poll(), but have been unable to ue it after 3.92 */
  313. /* #define USE_POLL        /* use the poll() system call instead of select() */
  314. #include <sys/socket.h>    /* if we don't use poll() we need this */
  315.  
  316.  
  317.  
  318. /*-------- Use terminfo database instead of termcap --------------------*/
  319. #define USE_TERMINFO    /* use terminfo instead of termcap */
  320.  
  321.  
  322.  
  323. /*-- What argument does wait(2) take? Define this if it is a union -----*/
  324. #define HAVE_WAIT_UNION  /* the arg to wait is a union wait * */
  325.  
  326.  
  327. /*-------- Is window resizing available? -------------------------------*/
  328. #if defined(TIOCGWINSZ) && defined(SIGWINCH)
  329. #define RESIZING  /* SIGWINCH and friends */
  330. #endif
  331.  
  332.  
  333.  
  334. /*-------- If no vfork, use regular fork -------------------------------*/
  335. #define vfork fork  /* vfork is just a lightweight fork, so can use fork */
  336.  
  337.  
  338.  
  339. /*----- The usual sendmail configuration for sending mail on Unix ------*/
  340. #define SENDMAIL    "/usr/lib/sendmail"
  341. #define SENDMAILFLAGS    "-bs -odb -oem"    /* send via smtp with backgroud
  342.                        delivery and mail back errors */
  343.  
  344.  
  345. /*----------------------------------------------------------------------
  346.    If no nntp-servers are defined, this program will be used to post news.
  347.  ----*/
  348. /* #define SENDNEWS    "/usr/local/bin/inews -h"    /* news posting cmd */
  349.  
  350.  
  351. /*--------- Program employed by users to change their password ---------*/
  352. #define    PASSWD_PROG    "/bin/passwd"
  353.  
  354.  
  355. /*-------------- A couple constants used to size arrays ----------------*/
  356. #include <sys/param.h>          /* Get it from param.h if available */
  357. #define MAXPATHLEN 1024
  358. #undef MAXPATH                  /* Sometimes defined in param.h differently */
  359. #define MAXPATH MAXPATHLEN      /* Longest pathname we ever expect */
  360. /* #define MAXPATH        (512)    /* Longest pathname we ever expect */
  361. #define MAXFOLDER      (64)     /* Longest foldername we ever expect */
  362.  
  363.  
  364. /*-- Max screen pine will display on. Used to define some array sizes --*/
  365. #define MAX_SCREEN_COLS  (170)
  366. #define MAX_SCREEN_ROWS  (200)
  367.  
  368.  
  369. /*---- When no screen size can be discovered this is the size used -----*/
  370. #define DEFAULT_LINES_ON_TERMINAL    (24)
  371. #define DEFAULT_COLUMNS_ON_TERMINAL    (80)
  372.  
  373.  
  374. /*----------------------------------------------------------------------
  375.     Where to put the output of pine in debug mode. Files are created
  376.  in the user's home directory and have a number appended to them when
  377.  there is more than one.
  378.  ----*/
  379. #define DEBUGFILE    ".pine-debug"
  380.  
  381. /*----------------------------------------------------------------------
  382.     The number of debug files to save in the user's home diretory. The files
  383.  are useful for figuring out what a user did when he complains that something
  384.  went wrong. It's important to keep a bunch around, usually 4, so that the
  385.  debug file in question will still be around when the problem gets
  386.  investigated. Users tend to go in and out of Pine a few times and there
  387.  is one file for each pine invocation
  388.  ----*/
  389. #define NUMDEBUGFILES 4
  390.  
  391. /*----------------------------------------------------------------------
  392.    The default debug level to set (approximate meanings):
  393.        1 logs only highest level events and errors
  394.        2 logs events like file writes
  395.        3
  396.        4 logs each command
  397.        5
  398.        6
  399.        7 logs details of command execution (7 is highest to run any production)
  400.        8
  401.        9 logs gross details of command execution
  402.  ----*/
  403. #define DEFAULT_DEBUG 2
  404.  
  405.  
  406.  
  407. /*----------------------------------------------------------------------
  408.     Various maximum field lengths, probably shouldn't be changed.
  409.  ----*/
  410. #define MAX_FULLNAME      (50)
  411. #define MAX_NICKNAME      (20)
  412. #define MAX_ADDRESS      (100)
  413. #define MAX_NEW_LIST     (100)  /* Max addrs to be added when creating list */
  414. #define MAX_SEARCH       (100)  /* Longest string to search for             */
  415. #define MAX_ADDR_EXPN   (1000)  /* Longest expanded addr                    */
  416. #define MAX_ADDR_FIELD (10000)  /* Longest fully-expanded addr field        */
  417.  
  418.  
  419. #endif /* _OS_INCLUDED */
  420.